Multiple Inheritance Bug Log

1/8/90	core.c - Core::callstack()
	when marching through stackframes, it now caches
	the fp's instead of looking at them twice

1/18/90	sunoscore.c - SunosCore::open()
	It now tries to set sysaddr, the base of the kernel,
	from the Sysbase symbol table entry in /vmunix.
	This change is necessary for pi to work on the
	Sun3/80.  On a 3/80, if /vmunix not accessible
	on startup, you will not be able to access the stack
	(will generate an address error).

1/24/90	srctext.c - SrcText::read()
	If the symbol table says there are more lines in the file
	than there really are, the extra lines will now be
	correctly initialized.  This seems to happen in some C++
	files on the Suns, as the line numbers in the symbol table
	may be higher than the line in the source file.  Without
	this fix, a context search using / that falls off the end
	of the file will cause a core dump.

1/25/90	asm.c - Instr::regarg()
	now allows the argument pointer to be the same register
	as the frame pointer, so the dissassembler for both
	the Sparc and M68k will now correctly symbolically print
	out local variables and arguments.

	bpts.c - Bpts::select()
	changed the printout of bpts in the breakpoint window
	from if(%s) to %s, so the displayed format now
	corresponds to the keyboard input language in the process
	window.  It is no possible to dump the breakpoint window
	into a file, and read it directly back into the process window
	to reset them (in a new instance of pi).

	process.c - Process:kbd()
	modified input language to correspond to breakpoint window.
	before it was:
		bpt func {} [cond]
	or	bpt file:line [cond]
	in the new langague, the bpt is no longer necessary.

2/2/90	sunossymtab.c - SunosSymtab::tree()
	modified to use the N_TXT entries that
	end in .o, to delimit the end of a src file.  Fixes
	bug that last function in a file compiled with -g was
	sometimes missing if the file after it in the symbol
	table was compiled without -g.  It should also help
	if you forget to link with the -g flag.

2/28/90 sunossymtab.c - SunosSymtab::tree()
	modified N_FUN handler so it looks ahead to the first
	SLINE to see if a SOL occurs first.  This solves 2
	problems: reject of functions that are really in file,
	and false inclusion of functions that are defined in
	includes.  These both seemed to occur frequently with
	C++, and very infrequently in C files.

3/21/90 dsp32dbmon.c - Dsp32DbmonCore::liftbpt()
	added as breakpoints are now maintained in the remote agent
	for both the chips and the simulator
	dsp32dbmon.h - declaration of above
	bpts.h - Dsp32DbmonCore now friend of Trap

3/23/90 coffsymtab.c, coff.h - CoffSymTab::gettbl() and
	CoffSymTab::gatherfunc() modified to force long word
	alignment of longs.  Otherwise, core dumps occurred on
	Sun4s.  Code was provided courtesy of Barry Locklear.

4/9/90	sunoscore.c - SunosCore::open(), SunosCore::reopen()
	Test for core file changed to !alldigits(procpath())
	instead of !strcmp(basename(procpath()), "core"), so
	core files can have arbitrary names instead of just core.
	sunosproc.c - SunosProc::carte() also changed to use
	alldigits to separate core dumps from processes.

4/23/90	sparccore.c - SparcCore::instrafterjsr() fixed to check
	if the instruction at pc()+8 is an unimplemented instruction.
	If so, add 4 to the return address since that instruction is
	used as a size argument to functions that return structures.
	Symptom was stepping over function calls that return structures
	caused illegal instruction traps.

5/2/90	sunoscore.c - SunosCore::open()
	Changed to set sysaddr from the kernel symbol KERNELBASE_DEBUG
	instead of Sysbase.  The fix made on 1/18/90 fixed pi to work
	on the 3/80, but broke core dump debugging on Sun4s.

5/4/90	sunoscore.c - SunosCore::open(), moved call to SysErr if can't
	open symbol table directly after the open.  Symptom was it didn't
	print out correct error message: i.e. "errno 0"
	instead of "No such file or directory".

5/4/90	Process::habeascorpus() - when status is HALTED, the status line
	now prints out the pc.  This way if a program stops and there is
	no call stack (for example, after a hang) the pc can be discovered
	without opening the assembler window.  I.e. under SunOS after hang
	it used to print:
		STOPPED:
	now it prints:
		STOPPED: pc=start()

5/7/90	SrcText::open() - changed default tab from 4 to 8.

6/4/90	Expr::evalenv() - fixed bug that caused core dumps if you
	tried to evaluate the value of a variable in a frame below
	the current frame(more recent) with the syntax:
		{expr}function
	The destructor for the Frame sta was being called before
	the code was done with it.

6/8/90	Phrase::increfcast() - fixed bug that if you tried to cast a
	Frame line of the type:
		(* ? )expression
	with the "* ?" menu entry, it didn't correctly generate a new
	line of the form:
		(** ?)expression

6/20/90	memory.c - Cell::dodisplay(), memory window didn't display floats
	correctly when the cell size was 4 bytes.
	Needed to assign  m->flt to m->dbl.

8/27/90 pads/host/term.c - PadsTermInit() now uses the JTOOLSBIN environment
	variable to locate the pi binary on the remote host when pi is
	invoked with the -r option, innstead of having the directory
	/usr/jtools/bin hardwired into the code.  That directory is still
	the default, if the environment variable is not set.

9/18/90 dbmon.c - DbmonProcess::hang() now allows command line arguments to
	new processes started from rtpi.  Added for use with debug monitor
	with DSP32Cs.
	DbmonMaster::open() added window menu with "ps" entry so the window
	may display may be updated without having to select the "open board"
	entry in the Processors window.
	DbmonMaster::refresh() - fixed so entries that start with "!" are not
	removed from the window when it is refreshed.

	sunosmaster.c - SunosMaster::refresh() fixed by that caused entries
	that start with "!" to be removed on refresh.  String comparison was
	with stabpath instead of procpath.

9/24/90 dbmon.c - DbmonCore::behavetype() now returns ERROR if state
	is DBKS_NULL or unknown, instead of PENDING. It was necessary to add
	the routine DbmonCore::problem() to print out the error message
	when this happens.

	dsp32dbmon.c - added Dsp32DbmonCore::faultname() to print out the
	exit status of a DSP32C program running under the debug monitor.

10/2/90 sunossymtab.c - SunosSymTab::gatherfunc() added an #ifdef sparc
	to fix the offsets to chars and short arguments on Sun4s.  The
	offsets extracted from the symbol table need to have additional
	offsets added in some cases.

	main.c - main() added a -V option to print out the version.
	The version string is created by the Makefiles. Currently
	prints out name of program compiled as, date, host, and user
	doing the compilation.

11/90 - 6/91 Too many changes to list, but here are some of them
	Now use hosts.c for all Unix systems, and C(not C++) files to do
		all the OS dependent code for Unix systems.
	Added support for Mips R3000(Silicon Graphics) (mips*.[ch])
		and Intel 80386 (i386*.[ch]) processors.
	Added PI_SRCPATH, to locate SRC files.
	Rtpi - unix.c allows remote debugging of Unix machines through
		servers. The servers use the same C files for controlling
		processes as host.c does when debugging locally.

6/6/91	mipssymtab.c - *FileDesc::src() now retains the fp offset information
	for functions that are defined in include files, so the stack
	traceback doesn't fail when the program is stopped in a rooutine
	that was defined in an include file.  It used to just throw away
	function descriptions that were in include files.

6/10/91	lib.c - pathexpand() now will search for files that start
	with "./" or "../" on the path, if they are not
	found after looking in the current directory. This was added to
	allow the PI_SRCPATH environment variable to be able to locate
	source files that start with these strings (i.e. as generated
	by SRCPATH with nmake).

6/10/91	pads/host/menu.c - Limited the number of entries in a menu to 255.
	The code used to place all the entries in the menu, and then
	send only the first 255 to pads. However, when huge numbers of
	gloabls or user defined types were present, all the the string
	space in the Item cache was wasted.  The new method just ignores
	entires after size > 255.

	demangle.c - Because of the new algorithm is menu.c, there is no
	need to change the names of the p and v tbls so they start with
	"zz". If there are one of the first 255 symbols they will be in
	the globals menu, otherwise they will not.

6/10/91 pads/x11/scripthit.c - ScriptHit checks to make sure that a menu
	entry string will fit in the array fill[] becfore copying it and
	computing its position. Fixed bug that caused large menu entries
	(usually from C++,in globals window) to pop-up outside and to the
	left of the menu. The pads library limited strings to 64 bytes
	long but Scripthit could only ones that were 63 bytes long.

6/18/91	srcdir.c - SrcDir::open() - Changes line that inserts source
	path in window to only print first 256 characters. Allows PI_SRCPATH
	variable to be set to very long names (>1024 characters).
	Without this fix, pi core dumped when this happend.

7/29/91 sunossymtab.c - SunosSymTab::gatherfunc() undid the change
	made on 10/2/90. Sun fixed the symbol table in their compiler
	in SunOS release 4.1.1.

8/22/91 sunossymtab.c - SunosSymTab::gatherfunc() - if a N_PSYM is followed
	by a N_RSYM ona Sparc machine, the N_PSYM is ignored. Problem
	was that the entry for the register args that corresponded to
	the memory entry was invalid on Sparc machines since the arguments
	is actually passed in a register. On Sparcs, pi no longer prints
	out the register arguments in the Process window, but the values
	that were printed there were invalid anyways.

	Same routine, also insert a statement in the starting address of
	the first statement does not correspond to the starting address
	of the function. The allows the SparcCore::stepprolog() to work
	even whne the symbol table screws up (I've seen this behavior
	in 1 line C++ functions in pi), i.e. the functions at the top
	of core.c.

8/23/91 symbol.c Source::stmtafter() - fixed to allows functiions to be
	in non-monotonically increasing line order. While never a problem
	with C, C++ release 3.0 changes the order of functions in the
	output file when templates are included. Did this at the request
	of Steve Buroff in C++ group at LC.

8/29/91 Compiled with C++ 3.0beta2 and had to make several minor changes.
	expr.c, expr.h - Expr::catchfpe() was made public and a new static
	routine was defined for the floating pointing handler as the new
	compiler didn't allow Expr::catchfpe to be cast into a type SIG_TYP.
	The old code would have done the wrong thing anyways.

	expr.c,phrase.c,sunossymtab.c,process.c - The new compiler is also
	pickier about making declarations within case statements. This files
	had problems, but adding an extra pair of {}s always solved the problem.

11/19/91 coff.h, coffsymtab.c - Modified CoffSymTab::CoffSymTab(),
	CoffSymTab::~CoffSymTab() and CoffSymTab::gethdr() to allow an
	unlimited number of sections. Previously, only 8 sections were
	allowed. Mel Melchner was having a problem with one of his
	DSP programs.

1/23/92	mipssym.h, mipssymtab.c - Updated MipsSymTab::gatherutype(),
	MipsSymTab::tree(), and MipsSymTab::gatherustub() so they no
	correctly handle the new symbol table entrie stStruct, stUnion,
	and stEnum that were introduced in IRIX 4.0.

1/23/92 sgoisfunc.c - Completely rewritten to use the SysVR4 /proc interface
	instead of using the SGI supplied fnctl (SysVR3.3) interface.

3/12/92 sun4osfunc.c - pi_readwrite - Fixed so it doesn't try to unaligned
	reads in the text section. This caused kernel panics with the
	message: Memory alignment error. Sun also has a beta patch tape
	available to fix this.

3/24/92 host.c - added declarations for pi_getppid and pi_pidtoproc, and
	modified HostProcess::imprint() to get the parent's id number from
	the C xxxosfunc.c driver. As it was, the "open child" option always
	failed.

	pi.sgi/sgiosfunc.c - added pi_getppid and made pi_pidtoproc external.
	All to fix "open child". Also need to modify
	pi.sun4/sun4osfunc.c, pi.sun3/sun3osfunc.c, and pi.i386/i386osfunc.c
	to do the same thing.

3/25/92 mipssymtab.c - MipsSymTab::gatherfunc() fixed to jump over structs,
	enums, and unions defined in the function. The stEnd symbol associated
	with the struct definition was causing the loop that locates local
	variables to exit prematurely.

5/1/92 m68kcore.c - M68kCore::newSymTab() - modified to allow executables
	in either the Sun3 or Coff (m68k SGS) symbol table format.

5/5/92 sunossymtab.h - SunosTFile added the highest field to distinguish
	when the same file is entered in the share database multiple times,
	which one should be used. The previous algorithm used the first
	one found, searching from the end of the list of files.
	The new algorithm uses the entry that has the most types defined
	in it. Problem was sometimes pi was getting the wrong type info
	for files that were in the shared type database. SOmetimes multiple
	entries were placed in the database for the same file, but the
	additional entries did not define any of the types.
	sunossymtab.c - SunosTShare::findfile(), SunosTShare::addfile(),
	and SunosTShare::entertype() modified to use the highest field.

7-8/92	Many changes to support multiple functions per source line and
	C++ 3.0 code and demangler.

8/24/92 wd.c - Wd::carte() removed check to see if file name ends in .?
	to allow directory names such as V1.0. This check was apparently
	in there to avoid doing stats on all the .[ch] files, but it
	disallowed some valid directories.

8/24/92 symbol.c - Source::stmtafter now does a full search of the
	statments in a function to try to find the best one. Since we
	only have to search a single function this isn't too bad, and
	it also allows strange orderings created by compilers, such as C++,
	to work. The old algorithm was failing when return statements
	in the middle of a function associated the code with the closing
	bracket, even though the code was in the middle of the function.
	I have only seen this generated by cfront.

9/15/92	ieeesymtab.c, ieeesymtab.h, ieee.h added to support rtpi debugging
	of 68k targets that use the Microtek Research Incorporated C compiler.
	This compiler generates IEEE Standard 695-1990 format symbol tables.

	symbol.h - added a Source *src filed to UType. This allows the
	sunossymtab.c and ieeesymtab.c parsers to access the per source file
	type information when gatherutype() is called.

	sunossymtab.c - modified the SunosUType structure to remove
	the field for typeinfo, since now it can be located through the
	src file in UType. Also updated the file to use delete [] on arrays,
	as C++ requires. It didn't really matter since none of the arrays
	had destructors, but it is the correct way to do it.

	m68kcore.c - M68kCore::newSymTab - added new switch for IeeeSymTab

9/29/92	mipssymtab.c - MipsSymTab::gethdr() - Fixed a bug that caused the
	symbol table parser to core dump with latest compiler in 4.0.5C.
	The object files now contain some info between the shdr and
	shdr->cbLineOffset, so an additional lseek was needed.

11/17/92 symbol.c - Source::~Source() added a delete of srctext, since it was
	never deleted. On SGIs, this seemed to cause lines in the Source window
	to be attempted to be serviced, after the Process window was closed.
	Because the PadRcv destructor was never called, the SrcText class
	handled the display requests, even though the Core had already been
	destroyed. This should fix that problem, although there after looking
	at the code there are several other (unrelated) data structures that
	are not deleted, so this problem has the potential of reappearing
	somewhere else. I need to carefully go through the code to make
	sure everthing "new"ed is "delete"ed.

11/23/92 sunossymtab.c, sunossymtab.h - SunosTShare::findfile() - changed the
	method used to locate shared include files. The value field is now
	used for matching in case there are multiple entries for the same
	file name. The old algorithm, that used the one with the most entries,
	sometime failed. The value field in the N_BINCL and N_EXCL symbol
	tables is used to differentiate the entires. This also required
	small modifications in SunosSymTab::tree(), SunosType::addinclude(),
	and SunosTShare::addfile to maintain the extra value field.

11/23/92 mipssymtab.c - MipsSymTab::gatherfunc - if the file is from Fortran
	source code, the arguments are mapped into appropriate types for
	C style Frame windows. This code does the right thing for basic
	data types and single dimension arrays, but screws up for
	multidimensional arrays. However, it makes debugging Fortran useable.

1/19/93 mipscore.c - MipsCore::callstack() - limit maximum number of stack
	frames to 1000. Otherwise, if a program runs away in a recursive
	infinite loop and has a lot of memory, it make take a very long
	time to execute this routine, as it walks through millions of stack
	frames. 1000 is the same limit used by Core::callstack().

2/4/93	Added help.c and on-line manual in the directory help. Help window
	now contains operator specific help info that can be accessed by
	typing "?", or using the "help" menu at the bottom of the "edit" menu.

4/7/93	Added support for SunOS5.X (Solaris 2.1). This included extensive
	modifications to sunossymtab.c and sunossymtab.h, and the addition of
	the new files sunos5symtab.c, sunos5sytmab.h, include/sun/elf.h,
	and include/sun/stabsunos5.h. In addition, several modifications were
	made to other files. Pads.h eliminated the varargs call and instead
	now uses <stdarg.h>. A macro for PRINTF_PROLOGUE was also added to
	pads.h. All referernces to index(), rindex(), and bcopy()
	were also removed to avoid having to pull in ucblib. Also wd.c now uses
	getcwd() in all cases. A unique "void" type was added to mip.h.
	Sparccore.c now does a switch and selects either the elf or a.out symbol
	table parser dynamically. The a.out parser was left in the Solaris
	version since that system will run a.out binaries if they are
	dynamically linked.  The pads/openlook directory was also modified
	so it has faster behavior when "clear"ing big windows and the Journal
	window now jump scrolls as new input arrives. This gives much better
	performance when data is being rapidly entered into the Journal.
	The Solaris version has been successfully tested with the following
	compilers:
		gcc 2.3.3
		SparcCompiler C 2.0.1
		AT&T C++ 3.0.1

4/16/93	sunossymtab.c, sunos5symtab.c - Had a bug in gatherfunc() that it
	was using the wrong typeinfo. It was using the typeinfo of the include
	file instead of the original (shared) source file. This bug was
	introduced in the transition to SOLARIS. Also, fixed parsetype()
	so that it now allows structures of 0 size to be declared. Centrline's
	C++ compiler sometimes generates (x,y)=s0; instead of following
	Suns convention of (x,y)=xsname when a pointer references a
	struct that hasn't been defined.

5/4/93 mipssymtab.c - MipsSymTab::gatherustub() fixed to generate unique
	struct tag names if a tag isn't provided (one's generated by the
	compiler are of the form .F%d) and there is already an entry for
	a struct with the compiler generated name in the symbol table. Symptom
	was some programs were getting the wrong type since the .F%d entries
	were not unique.

5/19/93 sunossymtab.c - SunosSymTab::tree() fixed to allow FUN entries that
	span multiple lines. This occurs if a type info is embedded in the
	FUN entry and it spans multiple entries using the "\" string extender.
	The extra FUN entries are now skipped. Before it thought the function
	ended after a single entry.

5/25/93 host.c - HostProcess::batch() fixed so if the returned callstack
	is 0, an error message and the pc will be printed out instead of
	core dumping. This may happen on Suns if the core dump is from
	an infinite recursive loop and all of the stack segment isn't
	placed in the core file.

6/3/93	host.c - HostProcess::fixsymtab() - changed the function pi_getpsfield()
	so it now returns the character offset of the executable name instead
	of the field offset. Problem was that on SunOS 4.X, if a program was
	running under nice, the extra field caused by the N screwed up
	the field offsets. This is only a problem with non /proc based debugging
	so it should have no effect on sgi, solaris, i386 unless using
	the remote Unix debugging in rtpi. It was also fixed in the routine
	unix.c - UnixProcess::fixsymtab(). Also, all the pi.*/*osfunc.c
	files were updated to return the proper character offset.

6/8/93	symbol.c - Source::funcafter() - modified so it will work ok if there
	are functions with strange line numbers, such as the __sti, and __std
	functions for static constructors and destructors generated for a file.
	The problem was with the old algorithm the searching functions would
	get trapped in functions that had large values of lines.hi. The new
	one doesn't get trapped, but does more work. It finds the function
	that is guaranteed to be above the requested line, and then searches
	backwards (when entered in the link lists the functions are sorted
	by lines.lo, so that is all that is used in the initial comparison.

6/11/93	mipssymtab.c - MipsSymTab::gethdr() - now allows magic numbers for
	the -mips2 and -mips3 compiler options that create binaries for the
	MIPS 2 (R4000) instruction set and MIPS 3 instruction set (?).

12/3/93 sunossymtab.c - SunOS parser fixed so it works with Sun's unbundled
	ANSI C compiler. In SunosSymTab::tree(), the new compiler places
	additional symbol table entries that list the functions called by
	a function. These entries screwed up the parsing. Some additional
	tests on the n->n_value forces them to be ignored. Also, in
	SunosSymTab::gatherfunc(), the first of two symbol table entries
	now have type N_RSYM instead of N_PSYM for register arguments.

	frame.c - Frame::varcarte() modified so variable names that start
	with '_' are placed at the end of the variables menu instead of the
	start.

12/21/93 sunossymtab.c - Screwed up parsing of file static functions in changes
	made on 12/3/93. SunosSymTab::tree() is now fixed.

1/13/94 mipssymtab.c, mipscore.c, mipssymtab.h - Modified several functions
	so pi now works of IRIX 5.1. Executables changed from COFF to
	to ELF format, although debugging entries are still in Third Eye Format.
	Mipssymtab.c now handles either elf or coff.
	Also, modified MipsCore::stepprolog() to accomodate the way /proc
	steps into functions on the R4000. The pc no longer points to the
	start of the function, but may be in the middle of the prologue
	statement. Added to the full path options to mipssymtab.c, and
	modified MipsSymTab::gatherdtype to correctly parse C++ classes
	generated by SGI provided C++. New file pi.sgi5/sgi5osfunc.c takes
	care of the slightly different register interface provided in
	the 5.1 /proc. Also, core dumps now contain the text segement so it
	isn't necessary to fetch it from the symtab file.

3/8/94 core.c - Core::peek - aligned raw so it is on an octbyte boundary.
	Otherwise 64-bit sgi gets bus errors when trying to cast raw memory
	to a double.

	mipssymtab.c - MipsSymTab::gatherustub had an error for handling
	unnamed structs, enums, etc. I hope the added change didn't break
	anything on the old system.

	mipssymtab.c - MipsSymTab::gatherdtype() had a bug that if the
	entry pointed to another one because of a typedef it would follow
	the struct conditional code 1 time too many, leading to either
	incorrect results or core dumps.

3/16/94 mipssymtab.c - MipsSymTab::gatherdtype() fixed bug for declarations
	that contained a "volatile" with SGI compiler.

	sunos5symtab.c - Solaris parser fixed because of problems that
	were occuring with Solaris 2.3. Changes were similar to those made
	on 12/3/93 for SunOS 4.X. In addition, the new compiler seems to
	place zeros in the address of FUNC entries, so they must be retrieved
	from the .symtab section in Sunos5SymTab::dosymtab(). As it currently
	stands, the addresses will be screwed up if the function name is
	overloaded in C++ if addresses are not in the FUNC entries,
	since the search to locate the Func is done on the demangled names.
	Eventually, I will need to fix this.

3/18/94 sigmask.c - SigMask::SigMask() changed default so "hang on exec"
	is off, instead of on.
